﻿using BeetleX.XRPC;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;

namespace Chat
{
    public class Server
    {
        public static void StartServer()
        {
            XRPCServer server = new XRPCServer();
            server.RPCOptions.LogToConsole = true;
            server.RPCOptions.LogToFile = false;
            server.ServerOptions.DefaultListen.Port = 9999;
            server.ServerOptions.ExecutionContextEnabled = true;
            server.ServerOptions.Encoding = Encoding.UTF8;
            server.Register(Assembly.GetEntryAssembly());
            server.Open();
            Console.WriteLine("Server started!");
        }
    }
}
